<template lang="pug">
  #index
    .public
      router-view
</template>

<script>
  
  import {
    mapActions, 
    mapState, 
    mapMutations
  } from 'vuex'

  export default {
    name: 'index',
    components: {
      
    },
    data() {
      return {
        is: 'pub'
      }
    },
    watch: {
      '$route'() {
        let name = this.$route.name;
        
        this.is = ( name && name.length > 0 )
          ? name.split( '-' )[0]
          : '';
      }
    },
    created() {
      if ( this.is === 'staff' ) {
        this.setCustomGlobal( {
          'globalVM': this
        } );
        this.setUserID( '703d065b0b684ae9bf4fa3be67a4726c' );
      }
    },
    methods: {
      ...mapMutations( [
        'staffStore/setCustomGlobal',
        'staffStore/setUserID'
      ] )
    }
  }
</script>

<style lang='stylus' >
  @import '~static/pc/staff/css/staff.styl';
  @import '~static/pc/staff/css/funs/px2rem.styl';

  .page-container
      background $color(c-bg)
</style>
